// 笔试强训：比那名居的桃子

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, k; cin >> n >> k;
    vector<vector<int>> vv(n, vector<int>(2, 0));
    for(int j = 0; j < 2; j++)
    {
        for(int i = 0; i < n; i++)
        {
            cin >> vv[i][j];
        }
    }

    long long ans = 0, ans_happy = 0, ans_shame = 0;
    long long happy, shame;
    for(int i = 0; i < k; i++)
    {
        happy = (ans_happy += vv[i][0]);
        shame = (ans_shame += vv[i][1]);
    }

    for(int i = 0; i < n - k; i++)
    {
        happy += vv[i + k][0] - vv[i][0];
        shame += vv[i + k][1] - vv[i][1];
        if(happy > ans_happy || ((happy == ans_happy) && shame < ans_shame))
        {
            ans = i + 1;
            ans_happy = happy;
            ans_shame = shame;
        }
    }

    cout << ans + 1 << endl;
}